<?php
/**
 * Created by PhpStorm.
 * User: Chris
 * Date: 15/1/1
 * Time: 下午5:13
 */

class Controller_Api extends Controller_Rest {
    protected $format = 'json';

    protected function responseError($errorCode, $errorMsg){
        return $this->response(array(
            'status'=>STATUS_FAILURE,
            'errorCode'=>$errorCode,
            'errorMsg'=>$errorMsg
        ));
    }



    /**
     * 认证(绑定)帐号(异步）
     */
    public function action_requestBindAccount(){
        try{
            // do your logic here

            return $this->response(array(
                "status"=>"success",
            ));
        }catch(Exception $e){
            return $this->responseError($e->getCode(), $e->getMessage());
        }
    }




}